﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SelfService.DataAccess.Migrations
{
    public partial class 客户端新增主题 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "ThemeId",
                table: "SysClients",
                type: "char(36)",
                nullable: true,
                collation: "ascii_general_ci");

            migrationBuilder.CreateIndex(
                name: "IX_SysClients_ThemeId",
                table: "SysClients",
                column: "ThemeId");

            migrationBuilder.AddForeignKey(
                name: "FK_SysClients_SysThemes_ThemeId",
                table: "SysClients",
                column: "ThemeId",
                principalTable: "SysThemes",
                principalColumn: "ID");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_SysClients_SysThemes_ThemeId",
                table: "SysClients");

            migrationBuilder.DropIndex(
                name: "IX_SysClients_ThemeId",
                table: "SysClients");

            migrationBuilder.DropColumn(
                name: "ThemeId",
                table: "SysClients");
        }
    }
}
